Hosted Cache Mode
Hosted Cache mode is still
kind of peer-to-peer. However, in this deployment mode, all the content
that is cached on each peer is also cached on a central server in the
branch office. This hosted cache then becomes the central point of
reference for peers to validate locally cached content and then to
retrieve that content from the cache. In other words, a Hosted Cache
server is kind of a glorified caching proxy server.
Server-Side Configuration
The server-side
configuration for a Hosted Cache deployment is exactly the same as a
Distributed Cache deployment. However, there is one difference; a Hosted
Cache server must be deployed. Use the following steps to complete this
task:
1. | Install the BranchCache feature.
|
2. | Next, execute the following Netsh command:
netsh BranchCache set service mode=HOSTEDSERVER
|
3. | Install an SSL server authentication certificate where the subject name is set to the FQDN of the Hosted Cache server.
|
4. | Lastly,
configure the Hosted Cache server to use the server authentication
certificate. To do that, get the certificate hash from the certificate
you just installed, and execute the following command:
netsh HTTP ADD SSLCERT IPPORT=0.0.0.0:443 CERTHASH="cert-hash" APPID={d673f5ee-a714-454d-8de2-492e4c1bd8f8}
|
Understanding the SSL Certificate
As mentioned before, BranchCache
peers do not upload content to the Hosted Cache server. Instead, they
advertise the content in their cache, and the Hosted Cache server then
downloads the content it needs from the client. The SSL certificate is
required because clients “advertise” their content to the Hosted Cache
server by doing an HTTP post over TLS.
Client-Side Configuration
Like Distributed Cache mode, there are two methods for configuring Hosted Cache mode. The first method is via Netsh. For example, run a command prompt (Run As Administrator) and execute the following command:
netsh branchcache set service mode=HOSTEDCLIENT LOCATION="FQDN of Hosted Cache Server"
The second method for
configuring BranchCache on clients in Hosted Cache mode is GPO. Use the
following steps to complete this task:
1. | Enable the Turn On BranchCache GPO setting (Computer Configuration\Policies\Administrative Templates\Network\BranchCache).
|
2. | Enable the Set BranchCache Hosted Cache Mode GPO setting (Computer Configuration\Policies\Administrative Templates\Network\BranchCache).
|
3. | Enable and configure the BranchCache for Network Files GPO setting (Computer Configuration\Policies\Administrative Templates\Network\BranchCache).
Here, the latency value that determines when the network files aspect
of BranchCache will kick in must be specified. The default is 80.
|
Lastly, once the
BranchCache GPO settings have been configured, the next step is to
configure Windows Firewall to allow incoming HTTP:
- Allow TCP HTTP - 80 Inbound (from all other BranchCache clients—at the branch office).
Troubleshooting (Is BranchCache Doing Something?)
Unfortunately,
BranchCache is kind of a black box. When it’s working, users shouldn’t
notice anything. On the flip side, when BranchCache is not working,
users will still probably not really notice anything (besides a
performance hit). Therefore, to determine if BranchCache is functioning,
the following might be performed:
Load up NetMon and
watch the traffic flows. Or, if a tool is being used that can monitor
bandwidth across the WAN, improvements in bandwidth usage should be
seen.
Watch the
BranchCache event logs. However, this is only partly useful as a
majority of the BranchCache event messages are not very meaningful.
Run the netsh branchcache show status
command. The results from this command are actually a really good
starting point to see how BranchCache is configured on a BranchCache
client or Hosted Cache server.
Look
at the BranchCache performance counters (the BranchCache Kernel mode
and BranchCache counters). Just keep in mind that Kernel mode counters
are only seen server side.